package com.ld.hpfs.service.impl;


import java.util.ArrayList;
import java.util.HashMap;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ld.hpfs.dao.ImpSchemeMapper;
import com.ld.hpfs.service.ImpSchemeService;
@Service
public class ImpSchemeServiceImpl implements ImpSchemeService{
	private static final Logger logger = LoggerFactory.getLogger(ImpSchemeServiceImpl.class);
	
	@Autowired
	private ImpSchemeMapper impSchemeMapper;
	
	@Override
	public ArrayList<HashMap<String,Object>> getImpSchemeList(HashMap<String,Object> param){
		int count = impSchemeMapper.getImpSchemeListCount(param);
		if(count == 0){
			return null;
		}else{
			param.put("pageCount", count);
			return impSchemeMapper.getImpSchemeList(param);
		}
	}
	@Override
	public int setQuoteImpscheme(HashMap<String,Object> param){
		try{
			impSchemeMapper.setQuoteImpscheme(param);
			return 0;
		}catch(Exception ex){
			logger.error(ex.getMessage());
			return -1;
		}
	}
}